<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2022/3/25
 * Time: 16:18
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

namespace app\common\model;

class SystemLog extends Base
{
    protected $deleteTime = false;
    public function __construct(array $data = [])
    {
        parent::__construct($data);
        $this->name = 'system_log_' . date('Ym');
    }

    public function setMonth($month)
    {
        $this->name = 'system_log_' . $month;
        return $this;
    }

    public function admin()
    {
        return $this->belongsTo('app\common\model\SystemAdmin', 'admin_id', 'id');
    }
}